from typing import Protocol

from poker_bot.core.models.dto.withdraw import WithdrawWithDetailsDTO
from poker_bot.domain.withdraw import WithdrawEntity


class WithdrawRepo(Protocol):
    async def acquire_withdraw_by_id(self, withdraw_id: int) -> WithdrawEntity | None:
        raise NotImplementedError

    async def create_withdraw(self, withdraw: WithdrawEntity) -> WithdrawEntity:
        raise NotImplementedError

    async def update_withdraw(self, withdraw: WithdrawEntity) -> None:
        raise NotImplementedError


class WithdrawReader(Protocol):
    async def get_withdraw_by_id(
        self, withdraw_id: int
    ) -> WithdrawWithDetailsDTO | None:
        raise NotImplementedError

    async def get_all_withdrawals(self) -> list[WithdrawWithDetailsDTO]:
        raise NotImplementedError

    async def get_withdrawals_for_confirmation(self) -> list[WithdrawWithDetailsDTO]:
        raise NotImplementedError
